import request from '@/utils/reuqest/common.js'
import config from '@/config.js';

const api = {
  // 更新用户信息
  async appUpload(data) {

		const [_, res] = await uni.uploadFile({
			url: config.BASE_URL + '/app/login/upload',
			name: 'fileData',
			filePath: data.filePath,
			...data
		}).catch(e => console.warn(e))

		const ret = JSON.parse(res.data)

		return ret
	},
	// 获取性格类型列表
	appIndexListCharacterType(data, header) {
		return request('GET', data, `/app/index/listCharacterType`)
	},
  getUserData(data) {
		return request('GET', data, `/app/user/getQueryById`, 'form')
	},
}

export default api
